home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks97
/
FinderDungeon.sit
/
Finder Dungeon
/
source code
/
FinderRegistry.h
< prev
next >
Wrap
Text File
|
1997-06-28
|
9KB
|
362 lines
/*
File: FinderRegistry.h
Contains: Classes, properties and data types used by the Scriptable Finder
Written by: Francis Stanbach & Greg Anderson
Copyright: © 1991-4 by Apple Computer, Inc., all rights reserved.
Change History (most recent first):
To Do:
*/
#ifndef __FINDERREGISTRY__
#define __FINDERREGISTRY__
#define FinderRegistry_h
#ifndef __AEREGISTRY__
#include "AERegistry.h"
#endif
////////////////////////////////////////
// Finder Suite
////////////////////////////////////////
//
// The old Finder Event suite was 'FNDR'
// The new suite is 'fndr'
//
enum {
kAEFinderSuite = 'fndr'
};
////////////////////////////////////////
// Finder Events
////////////////////////////////////////
enum {
kAECleanUp = 'fclu',
kAEEject = 'ejct',
kAEEmpty = 'empt',
kAEErase = 'fera',
kAEGestalt = 'gstl',
kAEPutAway = 'ptwy',
kAERebuildDesktopDB = 'rddb',
kAESnooze = 'snoz', // Go to sleep
kAEUpdate = 'fupd'
};
////////////////////////////////////////
// Classes
////////////////////////////////////////
enum {
cFinder = cApplication, // the finder object ≈ null
cDisk = 'cdis',
cFolder = 'cfol',
cTrash = 'ctrs',
cDesktop = 'cdsk',
cContainer = 'ctnr', // Disks, folders, trashes, desktops, suitcases
cSharableContainer = 'sctr', // Disks and folders
cSuitcase = 'stcs',
cFontSuitcase = 'fsut',
cAccessorySuitcase = 'dsut',
cAliasFile = 'alia',
cApplicationFile = 'appf',
cDocumentFile = 'docf',
cControlPanel = 'ccdv',
cDeskAccessoryFile = 'dafi',
cSoundFile = 'sndf',
cFontFile = 'fntf',
cContentSpace = 'dwnd', // Content space: includes desktop window & other windows
cContainerWindow = 'cwnd',
cInfoWindow = 'iwnd',
cSharingWindow = 'swnd',
cStatusWindow = 'qwnd', // Empty trash progress, 'copy' window
cPrivilege = 'priv',
cGestalt = 'cgst',
cProcess = 'prcs', // Information about a process running on this machine (like cApplication)
cAccessoryProcess = 'pcda',
cApplicationProcess = 'pcap',
cEntireContents = 'ects',
cUser = 'cuse',
cGroup = 'sgrp',
cIconFamily = 'ifam'
};
////////////////////////////////////////
// Properties
////////////////////////////////////////
//
// Properties of cObject:
//
enum {
pComment = 'comt',
pContainer = cContainer, // The container the object is stored in
pCreationDate = 'crtd',
pDemiWindow = cContentSpace,
pDisk = cDisk, // the disk the object is stored on
pIconBitmap = 'iimg',
pInformationWindow = cInfoWindow, // Get info window
pStatusWindow = cStatusWindow, // Status window (copy, empty trash, rebuild desktop database)
pIsLocked = 'islk',
pIsSelected = 'issl',
pKind = 'kind',
pModificationDate = 'modd',
pPhysicalSize = 'phys',
pPosition = 'posn',
pSize = pPointSize, // both are called "Size" in their respective terminologies, so they must have the same four-character code
pWindow = cWindow
};
//
// Properties of cFile:
//
enum {
pCreatorType = 'fcrt',
pFileType = 'fitp',
pVersion2 = 'ver2'
};
//
// Properties of cAliasFile:
//
enum {
pOriginalItem = 'orig' // Item pointed to by alias
};
//
// Properties of cApplicationFile:
//
enum {
pAppPartition = 'appt',
pSuggestedAppPartition = 'sprt',
pMinAppPartition = 'mprt'
};
//
// Properties of cContainer:
//
enum {
pContainerWindow = cContainerWindow, // Window that contains children
pEntireContents = cEntireContents,
pLabelIndex = 'labi',
pExpanded = 'pexp', // Same as kAEExpanded
pExpandable = 'pexa',
pCompletelyExpanded = 'pexc',
pSharingWindow = cSharingWindow, // Sharing window
pView = 'pvew',
pPreviousView = 'svew', // The last listwindow (non-icon) view
pSharing = 'shar',
pSharingProtection = 'spro',
pExported = 'sexp',
pMounted = 'smou',
pInheritedPrivileges = 'iprv', // "Same as enclosing" checkbox
pOwner = 'sown',
pGroup = cGroup,
pOwnerPrivileges = 'ownr',
pGroupPrivileges = 'gppr',
pGuestPrivileges = 'gstp'
};
//
// Properties of cDisk:
//
enum {
pCapacity = 'capa',
pEjectable = 'isej',
pFreeSpace = 'frsp',
pLocal = 'isrv',
pIsStartup = 'istd'
};
//
// Properties of cDesktop:
//
enum {
pTrash = 'trsh', // Can't use cTrash, and pTrash must == kTrashFolderType
pStartupDisk = 'sdsk'
};
//
// Properties of cTrash:
//
enum {
pWarnOnEmpty = 'warn'
};
//
// Properties of cFinder / cApplication:
//
enum {
pAppleMenuItemsFolder = 'amnu', // kAppleMenuFolderType
pControlPanelsFolder = 'ctrl', // kControlPanelFolderType
pDesktop = 'desk', // Can't use cDesktop, and pDesktop must == kDesktopFolderType
pExtensionsFolder = 'extn', // kExtensionFolderType
pFileShareOn = 'fshr',
pFileShareStartingUp = 'fsup',
pFontsFolder = 'ffnt',
pLargestFreeBlock = 'mfre',
pPreferencesFolder = 'pref', // kPreferencesFolderType
pAboutMacintosh = 'abbx', // Open this to get 'About this Macintosh' window
pShortcuts = 'scut', // Finder shortcuts in help menu
pShutdownFolder = 'shdf',
pStartupItemsFolder = 'strt', // kStartupFolderType
pSystemFolder = 'macs', // kSystemFolderType
pTemporaryFolder = 'temp', // kTemporaryFolderType
pTimerItemsFolder = 'timf',
pViewPreferences = 'pvwp' // Finder view preferences ("Views" control panel)
};
//
// View preferences properties
//
enum {
pViewFont = 'vfnt',
pViewFontSize = 'vfsz',
pGridIcons = 'fgrd',
pListViewIconSize = 'lvis',
pShowComment = 'scom',
pShowDate = 'sdat',
pShowDiskInfo = 'sdin',
pShowFolderSize = 'sfsz',
pShowKind = 'sknd',
pShowLabel = 'slbl',
pShowSize = 'ssiz',
pShowVersion = 'svrs',
pStaggerIcons = 'fstg'
};
//
// Properties of cPrivilegs
//
enum {
pSeeFiles = 'prvr',
pSeeFolders = 'prvs',
pMakeChanges = 'prvw'
};
//
// Properties of cProcess
//
enum {
pApplicationFile = cApplicationFile,
pDeskAccessoryFile = cDeskAccessoryFile,
pIsScriptable = 'isab',
pLocalAndRemoteEvents = 'revt',
pPartitionSpaceUsed = 'pusd',
pFolder = cFolder,
pObject = cObject,
pSharableContainer = cSharableContainer,
pSuitcase = cSuitcase,
pFontSuitcase = cFontSuitcase,
pAccessorySuitcase = cAccessorySuitcase
};
////////////////////////////////////////
// Enumerations defined by the Finder
////////////////////////////////////////
enum {
enumViewBy = 'vwby',
pSmallIcon = 'smic',
enumGestalt = 'gsen',
enumConflicts = 'cflc',
enumExistingItems = 'exsi'
};
////////////////////////////////////////
// Types defined by the Finder
////////////////////////////////////////
enum {
typeIconFamily = cIconFamily, // An AEList of typeIconAndMask, type8BitIcon, & c.
typeIconAndMask = 'ICN#',
type8BitIcon = 'icl8',
type4BitIcon = 'icl4',
typeSmallIconAndMask = 'ics#',
typeSmall8BitIcon = 'ics8',
typeSmall4BitIcon = 'ics4'
};
////////////////////////////////////////
// Keywords defined by the Finder
////////////////////////////////////////
enum {
keyIconAndMask = 'ICN#',
key8BitIcon = 'icl8',
key4BitIcon = 'icl4',
keySmallIconAndMask = 'ics#',
keySmall8BitIcon = 'ics8',
keySmall4BitIcon = 'ics4',
keyAEUsing = 'usin',
keyAEReplacing = 'alrp',
keyLocalPositionList = 'mvpl',
keyGlobalPositionList = 'mvpg'
};
////////////////////////////////////////
// New prepositions used by the Finder
////////////////////////////////////////
enum {
keyASPrepositionHas = 'has ',
keyAll = 'kyal',
keyOldFinderItems = 'fsel'
};
////////////////////////////////////////
// New key forms used by the Finder
////////////////////////////////////////
enum {
formAlias = typeAlias,
formCreator = pCreatorType
};
////////////////////////////////////////
// Finder error codes
////////////////////////////////////////
enum {
errFinderIsBusy = -15260,
errFinderWindowNotOpen = -15261,
errFinderCannotPutAway = -15262,
errFinderWindowMustBeIconView = -15263, // RequireWindowInIconView
errFinderWindowMustBeListView = -15264, // RequireWindowInListView
errFinderCantMoveToDestination = -15265,
errFinderCantMoveSource = -15266,
errFinderCantOverwrite = -15267,
errFinderIncestuousMove = -15268,
errFinderCantMoveToAncestor = -15269,
errFinderCantUseTrashedItems = -15270,
errFinderItemAlreadyInDest = -15271, // Move from folder A to folder A
errFinderUnknownUser = -15272, // Includes unknown group
errFinderSharePointsCantInherit = -15273,
errFinderBoundsWrong = -15278,
errAEValueOutOfRange = -15279
};
#endif